/**
 * 设置静态子页面菜单路由
 */
// 页面路由(独立页面)
export const pageRoutes = [
  {
    path: '/404',
    component: () => import('@/views/pages/404'),
    name: '404',
    meta: { title: '404未找到' },
    beforeEnter (to, from, next) {
      // 拦截处理特殊业务场景
      // 如果, 重定向路由包含__双下划线, 为临时添加路由
      if (/__.*/.test(to.redirectedFrom)) {
        return next(to.redirectedFrom.replace(/__.*/, ''))
      }
      next()
    }
  },
  {
    path: '/500',
    component: () => import('@/views/pages/500'),
    name: '500',
    meta: { title: '系统异常' },
    beforeEnter (to, from, next) {
      // 拦截处理特殊业务场景
      // 如果, 重定向路由包含__双下划线, 为临时添加路由
      if (/__.*/.test(to.redirectedFrom)) {
        return next(to.redirectedFrom.replace(/__.*/, ''))
      }
      next()
    }
  },
  { path: '/login', component: () => import('@/views/pages/login'), name: 'login', meta: { title: '登录' } },
  { path: '/register', component: () => import('@/views/pages/register/register'), name: 'register', meta: { title: '注册' } },
  { path: '/resetPassword', component: () => import('@/views/pages/resetPassword/resetPassword'), name: 'resetPassword', meta: { title: '找回密码' } },
  { path: '/drsFormDesign', component: () => import('@/views/modules/drs/drsFormDesign'), name: 'drsFormDesign', meta: { title: '表单设计器' } },
  { path: '/fr-p', component: () => import('@/views/modules/fr/index'), name: 'fr-p', meta: { title: '帆软中间件' } },
  { path: '/password', component: () => import('@/views/pages/password'), name: 'password', meta: { title: '密码修改' } }
]
